home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
CRS
/
crs08.d81
/
videos.prg
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2009-10-10
|
10KB
|
339 lines
5 PRINT"[147]":POKE53280,12:POKE53281,12:POKE646,1:Z$=CHR$(13):P=1:Q=1
6 PRINT"IF YOU ARE USING THE TAPE RECORDER, INSERT THE REWOUND FILE TAPE.";Z$
7 FORA=1TO3200:NEXT:A=0
8 DIMB$(25,20),C$(25,20),D$(25,20)
10 PRINT"THIS PROGRAM ENABLES YOU TO RECORD THE LOCATIONS OF TAPED VIDEOS.";Z$
11 PRINT"THERE ARE 500 POSSIBLE ENTRIES";Z$
15 PRINT"THIS PROGRAM AND ITS FILE WORK ON DISK AND CASSETTE TAPE.";Z$
20 PRINT"WHEN SAVING ON DISK THE FILE NUMBER IS '3' AND IS CALLED 'INDEX3'.";Z$
25 INPUT"HAS THIS PROGRAM OR FILE BEEN USED BEFORE";A$
30 IFA$<>"YES"ANDA$<>"NO"THEN25
33 PRINT"[147]"
35 PRINT"SELECT A FILE MOVEMENT OPTION";Z$:A=0
36 PRINT"(IF IT'S THE FIRST TIME FOR THIS PROGRAM/FILE, ONLY THE 'SAVE' HALF"
37 PRINT,,,"[145][157][157]OF EACH OPTION APPLY)";Z$
40 PRINT"1. LOAD FILE FROM DISK AND SAVE ON DISK AND TAPE"
41 PRINT"2. LOAD FILE FROM DISK AND SAVE ON DISK AND TAPE"
42 PRINT"3. LOAD FILE FROM DISK AND SAVE ON TAPE"
43 PRINT"4. LOAD FILE FROM DISK AND SAVE ON TAPE - EXECUTE IMMEDIATELY"
44 PRINT"5. LOAD FILE FROM TAPE AND SAVE ON DISK"
45 PRINT"6. LOAD FILE FROM TAPE AND SAVE ON DISK - EXECUTE IMMEDIATELY"
46 PRINT"7. FILE LOAD AND SAVE WITH TAPE ONLY"
47 PRINT"8. NONE OF THE ABOVE";Z$
48 PRINT"(OPTION 8 DEFAULTS FILE LOAD AND SAVE TO DISK ONLY)"
49 GETA:IFA=0THEN49
50 IFA>8THEN49
51 WA=A:PRINT"[147]":IFA$="YES"THENB=1
52 IFA=8THENWA=0
53 IFB=0ANDWA=4ORWA=6THENPRINT"CANNOT LOAD FILE ON FIRST USE";Z$:GOTO35
54 IFB=0THEN56
55 GOSUB1000:IFWA=4ORWA=6THENPRINT"[147]":END
56 A=0:A$="0":PRINT"SELECT A FUNCTION";Z$
57 PRINT"1. NEW ENTRY";Z$;"2. ENTRY CHANGE";Z$;"3. ENTRY DELETE"
58 PRINT"4. QUERY";Z$;"5. MARKING BORROWED/RETURNED TAPES";Z$;"6. END"
59 GETA$:IFA$=""THEN59
60 A=VAL(A$):IFA>6THEN59
61 IFA=6ANDI=1THENPRINT"[147]":GOSUB1200:PRINT"[147]":END
62 IFA=6ANDI=0THENPRINT"[147]":END
63 PRINT"[147]":ONAGOSUB100,200,300,400,700
64 GOTO56
100 PRINT"NEW PROGRAM ENTRIES";Z$;Z$;"WHEN DONE ENTER '0' FOR SHOW TITLE";Z$
105 FORF=PTO25
110 FORG=QTO20
115 INPUT"SHOW TITLE[153]";B$:PRINTZ$
116 POKE646,1
120 IFB$="0"THENP=F:Q=G:GOTO150
125 B$(F,G)=B$:I=1
130 INPUT"NARRATIVE[153]";C$(F,G):PRINTZ$
131 POKE646,1
135 INPUT"TAPE NUMBER[153]";D$(F,G):PRINTZ$
136 POKE646,1
143 IFG=20THENQ=1
145 NEXT:NEXT
150 PRINT"[147]";"":B$="0":RETURN
200 PRINT"ENTRY CHANGE";Z$;Z$;"ENTER '0' FOR SHOW TITLE WHEN DONE";Z$
205 L=0:INPUT"TITLE OF THE SHOW ENTRY BEING CHANGED[153]";A$:PRINTZ$:IFA$="0"THEN297
206 POKE646,1
210 FORM=1TOF
215 FORN=1TO20
220 IFB$(M,N)=A$THENI=1:L=1:GOTO239
225 IFM=FANDN=GTHEN234
230 NEXT:NEXT
234 IFL=0THENPRINT"[185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185]"
235 IFL=0THENPRINT"NO DATA FOUND ON SHOW";"[153]";A$;Z$;"":GOTO205
236 GOTO205
239 GOSUB2000
240 PRINT"VIDEO SHOW:[153]",DD$
241 IFDE$<>""THENPRINT,,DE$
242 IFDF$<>""THENPRINT,,DF$
243 IFDG$<>""THENPRINT,,DG$
244 PRINT"[159][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
250 PRINT"";"NARRATIVE:[153]",DH$
251 IFDI$<>""THENPRINT,,DI$
252 IFDJ$<>""THENPRINT,,DJ$
253 IFDK$<>""THENPRINT,,DK$
254 PRINT"[159][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
260 PRINT"";"VIDEO TAPE:";"[153]",D$(M,N);Z$;""
261 DD$="":DE$="":DF$="":DG$="":DH$="":DI$="":DJ$="":DK$=""
263 PRINT"WHAT DO YOU WANT TO CHANGE?";Z$
264 PRINT"1. TITLE";Z$;"2. NARRATIVE";Z$;"3. TAPE NO.";Z$
265 GETA:IFA=0THEN265
270 IFA>4THEN265
275 ONAGOTO280,285,290
280 INPUT"NEW TITLE[153]";B$(M,N):PRINTZ$;"":GOTO225
285 INPUT"NEW NARRATIVE[153]";C$(M,N):PRINTZ$;"":GOTO225
290 INPUT"TAPE NO.[153]";D$(M,N):PRINTZ$;"":GOTO225
297 PRINT"[147]";"":A$="0":RETURN
300 PRINT"ENTRY DELETE";Z$;Z$;"ENTER '0' FOR 'SHOW TITLE' WHEN DONE";Z$
301 POKE646,1:S=1:A=0:T=1:L=0:INPUT"TITLE OF SHOW[153]";A$:IFA$="0"THEN385
305 PRINT"":INPUT"TAPE NUMBER OR NAME[153]";TT$:PRINTZ$
306 PRINT"[158]";"YOU HAVE 15 SECONDS TO CHANGE YOUR MIND ABOUT DELETING";"[129]";A$
307 PRINTZ$;"[153]";"IF YOU CHANGE YOUR MIND PUSH 'T'";Z$:TI$="000000"
308 GETS$:IFTI$>"000015"THEN313
309 IFS$<>"T"THEN308
310 IFS$="T"THENPOKE646,1:GOTO301
313 FORM=STOF
315 FORN=TTO20
316 T=1:IFM=FANDN=GTHEN333
318 IFB$(M,N)<>A$THEN330
320 IFB$(M,N)=A$ANDD$(M,N)=TT$THENB$(M,N)="":C$(M,N)="":D$(M,N)="":L=1
323 IFL=1THENS=M:T=N:I=1:A=1:GOTO340
330 NEXTN:NEXTM
333 IFA=1THENL=1
335 IFL=0THENPOKE646,1:PRINT"NO DATA FOUND ON SHOW";"[153]";A$;Z$;""
336 IFL=1THENPOKE646,8:PRINT"SHOW[153]";A$;"[129]";"DELETED";Z$;"[129]"
337 A$="":TT$="":GOTO301
340 POKE646,2:PRINT"DELETING";"[129]";A$;"ON TAPE";TT$;Z$
341 L=0:FORO=MTOF
342 FORR=NTO20
343 N=1:IFO=FANDR=GTHEN375
344 IFR=20THENB$(O,R)=B$(O+1,1):C$(O,R)=C$(O+1,1):D$(O,R)=D$(O+1,1):GOTO365
347 B$(O,R)=B$(O,R+1):C$(O,R)=C$(O,R+1):D$(O,R)=D$(O,R+1)
365 NEXTR:NEXTO
375 FORU=1TOF
377 FORV=1TO20
380 IFB$(U,V)=""THENP=U:Q=V:F=U:G=V:GOTO384
383 NEXTV:NEXTU
384 GOTO330
385 PRINT"[147]";"":RETURN
400 A=0:PRINT"SELECT A QUERY MODE";Z$;"1. SHOW SEARCH"
405 PRINT"2. TAPE NO.";Z$;"3. NUMBER OF ENTRIES LEFT"
406 PRINT"4. PROGRAMS CURRENTLY ENTERED";Z$;"5. PROGRAMS BEING BORROWED"
407 PRINT"6. RETURN TO MENU";Z$
410 GETA$:IFA$=""THEN410
411 A=VAL(A$)
415 IFA>6THENA=0:GOTO410
416 IFA=6THEN440
417 PRINT"[147]"
420 ONAGOSUB500,600,800,1350,820
435 GOTO400
440 PRINT"[147]":RETURN
500 PRINT"THIS MODE LISTS DATA ENTERED ON A GIVEN SHOW";Z$
505 PRINT"ENTER '0' FOR 'SHOW TITLE' WHEN DONE";Z$
510 PRINT" [146]";Z$
513 ZA=0:L=0:INPUT"SHOW TITLE[153]";A$:PRINTZ$:IFA$="0"THEN560
514 POKE646,1
515 FORM=1TOF
520 FORN=1TO20
521 ZZ=LEN(A$):IFLEFT$(B$(M,N),ZZ)=A$THEN526
525 IFB$(M,N)<>A$THEN555
526 GOSUB2000
527 ZA=ZA+1
528 PRINT"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
530 L=1:PRINT"SHOW TITLE[153]",DD$
531 IFDE$<>""THENPRINT,,DE$
532 IFDF$<>""THENPRINT,,DF$
533 IFDG$<>""THENPRINT,,DG$
534 PRINT"[159][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
540 PRINT"";"NARRATIVE[153]",DH$
541 IFDI$<>""THENPRINT,,DI$
542 IFDJ$<>""THENPRINT,,DJ$
543 IFDK$<>""THENPRINT,,DK$
544 PRINT"[159][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
552 PRINT"";"VIDEO TAPE[153]",D$(M,N);Z$;""
553 DD$="":DE$="":DF$="":DG$="":DH$="":DI$="":DJ$="":DK$=""
554 IFZA=2THEN565
555 IFM=FANDN=GANDZA<>0THEN565
556 IFM=FANDN=GTHEN558
557 NEXT:NEXT
558 IFL=0THENPRINT"NO DATA FOUND ON SHOW:";"[153]";A$;Z$;""
559 ZA=0:GOTO510
560 A$="0":ZA=0:PRINT"[147]";"":RETURN
565 PRINT"PUSH 'T' TO CONTINUE";", 'E' TO ESCAPE";Z$
566 GETY$:IFY$<>"T"ANDY$<>"E"THEN566
567 IFY$="E"THENPRINT"[147]":GOTO510
568 PRINT"[147]":IFM=FANDN=GTHEN510
569 ZA=0:GOTO557
600 PRINT"THIS MODE LISTS THE SHOWS ENTERED ON A GIVEN TAPE ";Z$
605 PRINT"ENTER '0' FOR 'TAPE NO.' WHEN DONE";Z$
610 PRINT" [146]";Z$
611 L=0:ZA=0:INPUT"TAPE NO.[153]";A$:PRINTZ$:IFA$="0"THEN690
614 POKE646,1
615 PRINT"TAPE NO. :[153]";"";A$;Z$
620 FORM=1TOF
625 FORN=1TO20
626 IFLEFT$(A$,1)="*"THENLE=LEN(A$)-1:A$=RIGHT$(A$,LE):LE=0
627 IFLEFT$(D$(M,N),1)="*"THENA$="*"+A$
630 IFD$(M,N)<>A$THEN655
631 GOSUB2000
633 ZA=ZA+1
634 PRINT"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
635 L=1:PRINT"SHOW NAME[153]",DD$
636 IFDE$<>""THENPRINT,,DE$
637 IFDF$<>""THENPRINT,,DF$
638 IFDG$<>""THENPRINT,,DG$
639 PRINT"[159][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
640 PRINT"";"NARRATIVE[153]",DH$
641 IFDI$<>""THENPRINT,,DI$
642 IFDJ$<>""THENPRINT,,DJ$
643 IFDK$<>""THENPRINT,,DK$
644 PRINT"[159][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
654 DD$="":DE$="":DF$="":DG$="":DH$="":DI$="":DJ$="":DK$=""
655 IFM=FANDN=GANDZA=0ANDL=1THEN610
656 IFM=FANDN=GTHENZA=6:GOTO659
657 IFZA=2THEN665
658 NEXT:NEXT
659 IFL=0THENPRINT"";"NO DATA FOUND ON TAPE";"[153]";A$;Z$;""
660 ZA=0:GOTO610
665 POKE646,1:PRINT"PUSH 'T' TO CONTINUE";Z$
670 GETY$:IFY$<>"T"THEN670
675 IFZA=6THENZA=0:GOTO610
680 ZA=0:PRINT"[147]":GOTO658
690 ZA=0:PRINT"[147]";"":RETURN
700 PRINT"MARKING BORROWED/RETURNED TAPES";Z$
705 PRINT"ENTER '0' FOR 'TAPE' WHEN DONE"
709 E$="":F$="":G$="":H$="":B=0:L=0:PRINT"";Z$
710 INPUT"TAPE TITLE/NUMBER[153]";E$:PRINTZ$;"":IFE$="0"THENPRINT"[147]":RETURN
711 PRINT"I[146]N/O[146]UT ?";Z$
712 GETF$:IFF$<>"I"ANDF$<>"O"THEN712
713 IFE$="M"THENINPUT"SHOW TITLE[153]";G$:PRINTZ$;""
714 IFF$="O"THENINPUT"WHO'S BORROWING THE TAPE[153]";H$:PRINTZ$;""
715 PRINT"[158]WORKING";Z$:IFF$="O"THEN727
716 FORM=1TOP
717 FORN=1TO20
718 IFE$="M"ANDD$(M,N)="M"ANDB$(M,N)<>G$THEN720
719 IFD$(M,N)=E$THENL=1
720 IFD$(M,N)<>"*"+E$THEN725
721 IFE$="M"ANDB$(M,N)<>G$THEN726
722 IFE$="M"ANDB$(M,N)=G$THENGOSUB782:GOTO709
724 GOSUB782:L=1
725 IFM=PANDN=QTHEN770
726 NEXT:NEXT
727 FORM=1TOP
728 FORN=1TO20
729 IFM=PANDN=QTHEN770
730 IFE$="M"ANDD$(M,N)="*M"ANDB$(M,N)<>G$THEN732
731 B=LEN(D$(M,N)):IFRIGHT$(D$(M,N),B-1)=E$THENL=1
732 IFD$(M,N)<>E$THEN736
733 IFE$="M"ANDB$(M,N)=G$THENGOSUB780:GOTO709
734 IFE$="M"ANDB$(M,N)<>G$THEN736
735 L=1:GOSUB780
736 NEXT:NEXT
770 IFL=0ANDE$="M"THENPRINT"NO DATA FOUND ON TAPE[153]";E$;"TITLE[153]";G$:GOTO709
771 IFL=0THENPRINT"NO DATA FOUND ON TAPE[153]";E$
772 IFL=1THENI=1
773 GOTO709
780 D$(M,N)="*"+D$(M,N):C$(M,N)=C$(M,N)+"*"+H$:RETURN
782 B=LEN(C$(M,N)):FORO=1TOB
783 IFMID$(C$(M,N),O,1)="*"THENC$(M,N)=LEFT$(C$(M,N),O-1):GOTO785
784 NEXT
785 B=LEN(D$(M,N)):D$(M,N)=RIGHT$(D$(M,N),B-1):RETURN
800 A=500-((P-1)*20+(Q-1))
805 PRINT"THERE ARE";"[153]";A;"";"ENTRIES LEFT";""
810 FORZ=1TO2500:NEXT
815 A=0:Z=0:PRINT"[147]":RETURN
820 PRINT"TAPES CURRENTLY BEING BORROWED";Z$:ZB=13
825 FORM=1TOP
826 FORN=1TO20
827 IFLEFT$(D$(M,N),1)<>"*"THEN843
828 POKE646,ZB
830 ZA=ZA+1:L=1:ZZ=1:PRINTB$(M,N);TAB(34);D$(M,N)
839 IFZA=17THEN860
841 IFZB=13THENZB=3:GOTO843
842 IFZB=3THENZB=13
843 IFM=PANDN=QANDL=0ANDZZ=1THENEE=1:GOTO870
844 IFM=PANDN=QANDL=1THENEE=1:GOTO860
845 IFM=PANDN=QANDZZ=0THEN850
848 NEXT:NEXT
850 PRINT"NO TAPES ARE BEING BORROWED AT THIS TIME":FORA=1TO4000:NEXT
855 PRINT"[147]":RETURN
860 PRINTZ$;"PUSH 'T' WHEN DONE"
865 GETA$:IFA$<>"T"THEN865
870 IFEE=1THENL=0:ZA=0:ZB=0:ZZ=0:EE=0:PRINT"[147]":RETURN
873 PRINT"[147]":L=0:ZA=0:GOTO848
1000 IFWA=2ORWA=5ORWA=6ORWA=7THEN1100
1002 PRINT"LOADING FILE FROM DISK";Z$
1003 OPEN15,8,15
1005 OPEN3,8,2,"0:INDEX3,S,R"
1007 INPUT#3,P,Q
1010 FORM=1TOP
1015 FORN=1TO20
1017 IFM=PANDN=QTHEN1040
1018 INPUT#15,A1,A1$,A2,A3:IFA1>19THENPRINTA1$:STOP
1020 INPUT#3,B$(M,N),C$(M,N),D$(M,N)
1035 NEXT:NEXT
1040 CLOSE3:CLOSE15
1043 F=P:G=Q
1045 IFWA=4THEN1300
1050 PRINT"[147]":RETURN
1100 OPEN3,1,0,"INDEX3"
1103 INPUT#3,P,Q
1105 FORM=1TOP
1110 FORN=1TO20
1112 IFM=PANDN=QTHEN1127
1115 INPUT#2,B$(M,N),C$(M,N),D$(M,N)
1125 NEXT:NEXT
1127 F=P:G=Q
1128 CLOSE3
1130 PRINT"[147]";"REWIND FILE TAPE."
1133 IFWA=6THEN1200
1135 PRINTZ$;"PUSH 'T' WHEN READY"
1140 GETU$:IFU$<>"T"THEN1140
1145 PRINT"[147]":RETURN
1200 IFWA=3ORWA=7THEN1300
1205 IFB=1THEN1215
1210 OPEN15,8,15:OPEN3,8,2,"0:INDEX3,S,W":GOTO1217
1215 OPEN15,8,15:OPEN3,8,2,"@0:INDEX3,S,W"
1217 PRINT"SAVING FILE ON DISK";Z$
1220 PRINT#3,F;Z$;G
1225 FORM=1TOF
1230 FORN=1TO20
1233 IFM=FANDN=GTHEN1255
1235 PRINT#3,B$(M,N);Z$;C$(M,N);Z$;D$(M,N);Z$
1240 INPUT#15,A1,A1$,A2,A3:IFA>19THENPRINTA1$:STOP
1250 NEXT:NEXT
1255 CLOSE3:CLOSE15
1257 IFWA=1ORWA=2THEN1300
1260 PRINT"[147]":RETURN
1300 OPEN3,1,1,"INDEX3"
1305 PRINT#3,F;Z$;G
1310 FORM=1TOF
1315 FORN=1TO20
1320 PRINT#3,B$(M,N);Z$;C$(M,N);Z$;D$(M,N);Z$
1325 IFM=FANDN=GTHEN1331
1330 NEXT:NEXT
1331 CLOSE3:PRINT"[147]";"REWIND FILE TAPE";Z$
1332 PRINT"PUSH 'T' WHEN DONE"
1333 GETU$:IFU$<>"T"THEN1333
1340 PRINT"[147]":RETURN
1350 ZA=0:ZB=3:FORM=1TOF
1355 FORN=1TO20
1356 ZA=ZA+1
1358 POKE646,ZB
1360 IFM=FANDN=GTHENZA=21:GOTO1375
1365 PRINTB$(M,N);TAB(36);"";D$(M,N):POKE646,ZB
1367 IFZA=20THEN1375
1368 IFZB=3THENZB=13:GOTO1370
1369 IFZB=13THENZB=3
1370 NEXT:NEXT
1375 POKE646,1:PRINTZ$;"PUSH 'T' WHEN DONE";", 'E' TO ESCAPE"
1380 GETQ$:IFQ$<>"T"ANDQ$<>"E"THEN1380
1382 IFQ$="E"THENZA=0:PRINT"[147]":RETURN
1385 IFZA=20THENPRINT"[147]":ZA=0:GOTO1370
1390 IFZA=21THENZA=0:PRINT"[147]":RETURN
2000 VA$=B$(M,N):VB$=C$(M,N)
2010 DD$=LEFT$(VA$,19):DE$=MID$(VA$,20,19):DF$=MID$(VA$,40,19)
2020 DG$=MID$(VA$,60,19):DH$=LEFT$(VB$,19):DI$=MID$(VB$,20,19)
2030 DJ$=MID$(VB$,40,19):DK$=MID$(VB$,60,19)
2040 VA$="":VB$="":RETURN